Project presentation & objectives
Package RetakeExamF
- Description
- Functions
- Maze App
Limitations & future work
2023-08-31
Project presentation & objectives
Package RetakeExamF
Limitations & future work
The goal of this project is to develop an R package that generates mazes using various maze generation algorithms.
Create an interactive app where users can create their own maze and visualize the solution.
RetakeExamF is a dynamic R package that empowers users to craft captivating mazes using the Depth-First Search (DFS) and Recursive Backtracking algorithms. The package provides a user-friendly platform to generate mazes of varying complexities.
This algorithm starts by creating a grid of cells and then repeatedly selects a cell to carve a path while backtracking to create dead-ends.
source : https://aryanab.medium.com/maze-generation-recursive-backtracking-5981bc5cc766
RetakeExamF::rb_maze(31,31) # maze generation
Example of the functions usage :
# myGraph() Example_maze <- RetakeExamF::myGraph (nrows = 5,ncols = 9) #plotmyMaze() RetakeExamF::plotmyMaze(Example_maze,nrows= 5,ncols = 9)
The algorithm Depth-First Search (DFS) is a graph traversal algorithm that explores as far as possible along a branch before backtracking.
source: https://miro.medium.com/v2/resize:fit:720/1*unQanD3lFwpajj6lsJVw8g.gif
#dfs_method() Example_maze <- RetakeExamF::myGraph (nrows = 5,ncols = 9) Example_maze<-RetakeExamF::dfs_method(GraphMade = Example_maze) RetakeExamF::plotmyMaze(Example_maze,nrows= 5,ncols = 9)
# solver visualization RetakeExamF::solverGraph(Example_maze,nrows= 5,ncols = 9)
Example function that runs the app on shiny :
Now, let’s run the app !